import request from "@/utils/requestAdmin";

 export function getProduct(params){
    return request({
      url:'/product/list',
      params:params
    })
  }

  export function addProduct(form) {
    return request({
        url: '/product/add',
        method: 'POST',
        data:form
    })
}

  export function updateProduct(form) {
    return request({
        url: '/product/update',
        method: 'PUT',
        data:form
    })
}

export function deleteProductById(productId){
  return request({
      url:`/product/delete/${productId}`,
      method: 'DELETE',
  })
}

